# if True:
#     print(1)
#     print(313)
# else:
#     print(2)
# print(1)

# total = 1 + \
#         2 + \
#         3
# print(total)

# total = "agag"
# if total:
#     print(total)
# else:
#     print("awrewa")

# tel = 100
# print(tel)

# i = 1 + 2j
# print(i)

# total = 1 + 1 + \
#     3
# print(total)

# num = 1111111111111111111111111111111111111111111111111111111111111111
# print(num)
# b = 1

# import keyword
# class test:
#     num = 10
# print(test.num)
# print(keyword.kwlist)

# var = "this" + "  is" + " string"
# print(var + '\n' + "qdqd")

# input('\n\n press enter to quit')

# import sys
# x='rdd'
# sys.stdout.write(x + '\n')

# if 1:
#     print(1, end='')
#     print(2)
# elif 2:
#     print(2)
# else:
#     print(3)

# import sys
# print("================python import module===================")
# print('command line argmuments:')
# for i in sys.argv:
#     print(i)

# print('\npython path:')
# for s in sys.path:
#     print(s)

# from sys import path,argv
# print('python path:')
# for s in path[0:2]:
#     print(s)

# print('\ncommand line argments:')
# for i in argv:
#     print(i)

# import keyword
# print(keyword.kwlist)

#ddd

# if "ee":
#     print("ee")
# else:
#     print('xx')

# cont = 0o17;
# print(cont)

# s = "131324";
# s = '1';
# print(type(s))

# a, b, c , b= 10, 20, "xs", '1'
# print(type(a) ,type(b) , type(c))

# 1-2-01

# int = 10
# print(int)

# num = 10
# num -= 4
# print(num)
# print(type(num))

# typen = type(num)
# print(typen)
# print(type(typen))

# name = "xxx"
# print(type(name))

# name = "1121"
# name = str(1)
# print(type(name))

# name = float(111)
# print(name, type(name))

# name = str(11.11)
# print(name, type(name))

# num = int(1.9)
# print(num)

# α = 10
# print(α) # 可以用

# print("1 + 1 = " + str(1 + 1))
# print("1 + 1 = " + str(2 - 1))
# print("1 + 1 = " + str(10 // 3))
# print("1 + 1 = " + str(1 + 1))
# print("1 + 1 = " + str(1 + 1))

# print("""xxx"""); """xxx"""

# name = "xxx""xx"
# print(name)

# name = 1212
# print("xx" + name)

# class_num = 10
# avg_sal = 30000
# message = f"级别：{class_num}, 薪资：{avg_sal}"
# print(message)

# num = 100
# string = "num is %5.3d" % num
# print(string)

# print("1 * 1 = %d" % (1 * 1))
# print(f"1 + 1 = {1 + 1}")
# print("type: %s" % type(1))

# name = "clay"
# stock_price = 19.99
# stock_code = "003032"
# stock_price_daily_growth_factor = 1.2
# growth_days = 7

# print(f"公司名：{name}, 股票代码：{stock_code}, 当前股价：{stock_price}, 每日增长系数是：{stock_price_daily_growth_factor},  {growth_days}天后股价到了：%.2f" % (stock_price * (stock_price_daily_growth_factor**growth_days)))

# print("who are you?")
# name = input("who are you?\n")

# print("i'am %s" % type(name))

# name = input("name? :>")
# usr_type = input("class? :>")
# print(f"welcome, {name}, the type of you is {usr_type}")

# true = True
# if(true):
#     print(type(bool(true - 10)))

# false = False
# if (false):
#     print(00)
# else:
#     print(11)

# num1 = 10
# num2 = 10
# print(num1 != num2)

# s1 = "hello"
# s2 = "hello"
# print(s1 == s2)

# num1 = 10
# num2 = 20
# print(f"num1 >= num2: {num1 >= num2}")

# if 10 == 20:
#     print(11)

# num = int(input("input age: "))
# if num >= 18:
#     print("you are an adult")
# else:
#     print("you are a child")

# if int(input("input your height: ")) < 120:
#     print("free")
# elif int(input("input your level: ")) > 3:
#     print("free")
# elif int(input("date: ")) == 1:
#     print("free")
# else:
#     print("cost")

# num = 10
# if int(input("num: ")) == num:
#     print("right")
# elif int(input("num:")) == num:
#     print("right")

# if int(input("height: ")) > 120:
#     print("cost, but,")
#     if int(input("vip: ")) >= 3:
#         print("free")
#     else:
#         print("cost")
# else:
#     print("free")

# if (int(input("age: ")) >= 18) &True:
#     print("t")

# import random
# import sys

# num = 1
# while num < 100 :
#     print(num)
#     num += num;

# import random

# cnt = 0
# num = 30
# while True:
#     cnt += 1
#     tmp = int(input("input a num: "))
#     if(tmp < num):
#         print("too small")
#     elif(tmp > num):
#         print("too big")
#     else:
#         print("right")
#         break
# print(f"times: {cnt}")

# i = 1
# while i <= 9:
#     j = 1
#     while j <= i:
#         print(f"{j} * {i} = {j * i}\t", end = '')
#         j += 1
#     i += 1
#     print()

# import time
# time.sleep(1)
# print(1)

# name = "python"
# for c in name:
#     print(c)

# import os
# file_path = os.path.abspath(__file__)
# print(file_path)

# cnt = 0
# for c in file_path:
#     if(c == 'e'):
#         cnt += 1

# print(cnt)

# i = 0
# for i in range(1, 9):
#     for j in range(1, i + 1):
#         print(f"{j} * {i} = {j * i}\t", end="")
#         continue
#         print('yes\t', end='')
#     print()


# money = 10000
# for i in range(1, 21):
#     import random
#     if(money == 0):
#         print("there is no money any more")
#         break
#     per = random.randint(1, 10)
#     print(f"employee {i}, performance: {per}, ", end="")
#     if(per < 5):
#         print("no salary")
#         continue
#     money -= 1000
#     print(f"get salay, money left: {money}")

# print(random.randint(1, 20))

# 1-5-01

# len = len("aaaa")
# print(len)

# def fun():
#     print(111)

# fun()

# str1 = "11111"
# def mylen(string):
#     cnt = 0
#     for i in string:
#         cnt += 1
#     return cnt

# print(mylen(str1))

# def Add(a, b) -> int:
#     return a + b

# print(Add(1, 5))

# tmp = None
# if not tmp:
#     print(11)

# for i in range(4, 31, 5):
#     print(i)

# def func1():
#     print("func1 called")
#     func2()

# def func2():
#     num = 100
#     print("func2 called")

# func1()
# print(num) # func2 的局部变量不能用在全局中

# num = 20

# def fun1():
#     global num
#     num = 30
#     print(num)

# fun1()
# print(num)

# num = 20000

# def menu():
#     print("------------------主菜单------------------")
#     print("查询余额 [输入1]")
#     print("存款     [输入2]")
#     print("取款     [输入3]")
#     print("退出     [输入4]")

# def check():
#     global num
#     print("------------------查询余额------------------")
#     print(f"当前剩余: {num}")

# def deposit():
#     global num
#     print("------------------存款------------------")
#     num += int(input("存款金额: "))
#     print(f"当前剩余: {num}")

# def withdraw():
#     global num
#     print("------------------取款------------------")
#     num -= int(input("取款金额: "))
#     print(f"当前剩余: {num}")

# while True:
#     menu()
#     choice = int(input("请选择: "))
#     if choice == 1:
#         check()
#     elif choice == 2:
#         deposit()
#     elif choice == 3:
#         withdraw()
#     elif choice == 4:
#         break
#     else:
#         print("输入错误, 重新输入")

# name = ["1", "2", "3"]
# # empty = list()
# empty = []
# print(len(name), len(empty))

# nums = [[1, 2 ,3], [4, 5, 6], "sada"]
# print(nums)
# for v in nums:
#     for e in v:
#         print(e, end=" ")
#     print()

# print(type(nums[0]))
# print(type(nums[1]))
# print(type(nums[2]))

# 1-6-03

# var1 = "hello world"

# print(var1[:2] + "11")

# import time

# for i in range(101):
#     print("\r{:3}%".format(i), end='')
#     time.sleep(0.05)

# var = 10
# print(bin(var))
# print(oct(var))
# print(hex(var))

# print("12".count())
# print('h' not in a)
# print("hello %d" % 10)
# a = "hello py"
# a += '  拉拉'
# utf8encode = a.encode()
# gbkencode = a.encode('gbk')
# print(utf8encode.endswith('拉拉'))
# print(gbkencode)
# print(a)
# print(a.center(30, '-'))
# print(a.count('l'))


# var = "-"
# print(var.join("abc"))

# print(var.index('30'))
# print(var.endswith('782'))

# var = "111111A1111111a"
# print(var[0:])
# print(var.rfind('A'))
# print(max(var))

# l1 = ["aa", 'bb', 'cc', 'dd']
# print(l1[0:2])

# l1 = [1, 2 ,3]
# l1[1] = 1
# car = '111'
# print(l1)

# l1 = ['tianmei', 'google', 'runnoob', 100]
# print(len(l1))
# l1 += ['11', '232']
# print(l1)

# print(l1)

# l1[2] = 'l1[2]'
# print('after change', l1)
# l1.append('dd')
# print(l1)

# del l1[1]
# print(l1)

# l1 = ['rianmei', 'google', 'runnoob']
# print(max(l1))
# for e in l1:
#     print(e, end=' ')
# print(100 in l1)
# print(l1 * 2)

# sq = [1, 2,34,5,5,6,7,7]
# print(sq[-3])

# var = "121324"
# l1 = list(var)

# l1 = [3,1,2,4,'2']
# l1 = ['3','1','2','4']
# l1.reverse()
# l1.sort()
# l2 = l1.copy()
# print(l2)

# l1.insert(3, '11')
# for i in range(len(l1)):
#     print(l1)
#     l1.pop()

# l2 = [[1]]
# l2.extend(l1)
# print(l2)
# print(l1)
# print(l1.count(1))

# print(l1)
# str1 = str(l1)
# print(len(str1))
# l2 = []
# l2.append(l1)
# l2.append(l1)
# l2.append(l1)
# print(l2)

# t1 = (1, 2, 3, '4')
# print(type(t1))

# t1 = (10)
# print(type(t1))

# t2 = (1, 2 ,3, 4)
# print(t2[1:5:2])
# print(type(t2))

# tup1 = (12, 34.56)
# tup2 = ('abc', 'xyz')
# print(tup1[1])

# for e in tup1:
#     print(e)

# print(tup2[2:3])
# print(12 in tup1)

# 以下修改元组元素操作是非法的
# tup1[0] = 100
 
# 创建一个新的元组
# tup1 += tup2
# del tup2
# tup3 = tup1
# print (tup3)

# l1 = [1.2,3,4,5,6,2,2,4]
# t1 = tuple(l1)
# # print(t1)
# print(id(l1))
# print(id(t1))

# h1 = {"k1":"v1", "name":"clay", "lover":"rosie"}
# print(type(h1))
# print(len(h1))
# print(h1)

# print(h1["k1"])
# print(h1["name"])
# print(h1["lover"])

 
# tinydict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First', 1:2} 
# print(tinydict.popitem())
# print(tinydict)
# print(tinydict.pop("Name"))
# print(tinydict.items())
# print(tinydict.keys())
# print(tinydict.setdefault("Name"))
# print(tinydict.get("Name"))
# tinydict.update(h1)
# print(tinydict)
# print(tinydict.values())
# print(tinydict)
# print(str(tinydict))
# print(tinydict.get("Name"))
# print("Name" in tinydict)
# del tinydict['Name']
# print(tinydict)
# print ("tinydict['Alice']: ", tinydict['Name'])


# l1 = [0,1,2,3,4,5,6,7,8]
# print(l1[1:5:1])
# print(l1[3:0:-1])

# t1 = (0,1,2,3,4,5,6)
# print(t1[::1])
# print(t1[::-2])

# s1 = "01234567"
# print(s1[::2])
# print(s1[::-1])

# import string

# s1 = "万过薪月，员序程马黑来，nohyp学"
# print(s1[::-1][9:14])
# print(s1[5:10][::-1])

# lt = s1.split("，")
# # print(lt[1].rstrip("来")[::-1])
# print(lt[1].replace("来", '')[::-1])

# t1 = tuple()
# print(t1)

# s1 = str()
# print(s1)

# l1 = list()
# print(l1)

# 集合
# s1 = {"hello", "world", "11212", "hello"}
# s1.add("qqq")
# s1.add("www")
# s1.remove("11212")

# print(s1)

# s1 = {1, 2, 3}
# s2 = {1, 5, 6}
# s3 = s1.difference(s2)
# print(s3)
# print(s1)
# print(s2)

# s1.difference_update(s2)
# print(s1)
# print(s2)

# s3 = s1.union(s2)
# print(s1)
# print(s2)
# print(s3)

# s1.difference_update(s2)
# s3 = s1.union(s2)
# print(len(s3))

# i = 0
# while i < len(s2)

# for i in s1:
#     print(i)

# d1 = {"li":99, "lin":140, "alin":130}
# print(d1["li"])
# print(d1["lin"])
# print(d1["alin"])

# s1 = {}
# d2 = {}
# print(type(s1))
# print(type(d2))

# score = {
#     "n1":{
#         "c": 90,
#         "m": 88,
#         "e": 95
#     },
#     "n2":{
#         "c":70,
#         "m":78,
#         "e":55
#     },
#     "n3":{
#         "c":40,
#         "m":98,
#         "e":85
#     }
# }

# print(score)
# for e in score:
#     print(score[e])
# for e in score.keys():
#     print(score[e])
# print(score.keys())
# print(score.values().mapping)
# print(score["n1"]["c"])
# score["n1"]["f"] = 1000
# print(score["n1"]["f"])
# score["n1"].pop("c")
# print(score["n1"])
# print(len(score))

# print(score.get("n") == None)

# mem = {
#     "wang":{
#         "depart": "tec",
#         "sal": 3000,
#         "degree": 1
#     },
#     "zhou":{
#         "depart": "market",
#         "sal": 5000,
#         "degree": 2
#     },
#     "lin":{
#         "depart": "market",
#         "sal": 7000,
#         "degree": 3
#     },
#     "zhang":{
#         "depart": "tec",
#         "sal": 4000,
#         "degree": 1
#     },
#     "liu":{
#         "depart": "market",
#         "sal": 6000,
#         "degree": 2
#     }
# }

# for name in mem:
#     if(mem[name]["degree"] == 1):
#         mem[name]["sal"] += 1000
#         mem[name]["degree"] += 1
#     print(name, '\t', mem[name])

# d1 = {1:2, 3:4, 2:4, 6:7, 4:1}
# print(sorted(d1, reverse=True))

# s1 = "1"
# s2 = "2"

# print(s1 > s2)
# print(s1 < s2)

# def res():
#     return 1, "hello",True ,5

# x,y,z,a = res()
# print(x,y,z,a)

# def func(name, age, gender):
#     print(f"name:{name}, age:{age}, gender:{gender}")

# func("clay", 20, "man")
# func(age=20,name="xx",gender="wo")
# func("dd", gender="man", age=30)

# def func(*args):
#     print(type(args), args)

# func("1", 2)

# def func(**kwargs):
#     print(type(kwargs), kwargs)

# func(name = "clay", age = "20")

# def func(hh):
#     print(type(hh), hh)

# func([1, 2])
# func({1, 2})
# func({1:2})

# def func1(func2):
#     res = func2(1, 2)
#     print(res)

# def func2(x, y):
#     return x + y

# # func1(func2)
# # func1("11")
# func1(lambda x, y : x + y)

# 1-8-01

# import fileinput
# print(fileinput.filename())

# f1 = open("test.txt", "r", encoding="UTF-8")
# print(f1.read(10))
# print(f1.read())
# l = f1.readlines()
# for n in l:
#     print(n)
# l1 = f1.readline()
# print(type(l1))

# for l in f1:
#     print(l)

# f1.close()

# with open("test.txt", "r", encoding="UTF-8") as f1:
#     print(f1.fileno())
    # for l in f1:
    #     print(l)

# f1 = open("test.txt", "r+", encoding="UTF-8")
# print(f1.write("rwwrw"))
# print(f1.isatty())
# print(f1.readline())
# print(f1.tell())
# f1.truncate(200)

# f1 = open("test.txt", "r+", encoding="UTF-8")
# l1 = f1.readlines()
# cnt = 0
# for l in l1:
#     l = l.strip()
#     words = l.split(" ")
#     for word in words:
#         print(word)
#         if word == "itheima":
#             cnt += 1
#     # if(l.count("itheima")):
#     #     cnt += 1

# # def func():
# #     global cnt

# print(cnt)
    
# print(cnt)

# f1 = open("test.txt", "r+", encoding="UTF-8")
# s1 = f1.read()
# print(s1.count("itheima"))

# try:
#     # laal
#     f1 = open("abc.txt", "w")
# except Exception as e:
#     print(e)
# except (FileNotFoundError, NameError) as e:
#     print(e)
# except NameError as e:
#     print(e)
# except FileNotFoundError as e:
#     print(e)
# else:
#     print("no err")

# f1.close()
# print("11")

    # f1.close()

# def func1():
#     print("f1 start")
#     num = 1 / 0
#     print("f1 end")

# def func2():
#     print("f2 start")
#     func1()
#     print("f2 end")

# def func():
#     try:
#         func2()
#     except Exception as e:
#         print(e)

# func()

# 1-9-04


# import time
# time.sleep(1)
# print(1)

# s = __name__
# print(s)

# from my_module1 import func
# print(11)

# print(111)

# my_module1.test1()

# import my_module1

# from my_module1 import test1,test2
# test1()
# test2()

# func(1, 2)

# from my_package import my_module1
# from my_package.my_module2 import func
# func()
# my_module1.func()

# from my_package import *


